/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package grafica;

import TADs.ArvoreBinaria;
import TADs.Fila;
import TADs.Lista;
import TADs.ListaDEC;
import javax.swing.JOptionPane;

/**
 *
 * @author Thales Menato
 */
public class gMenu extends javax.swing.JFrame {

    /**
     * Creates new form gMenu
     */
    
    Fila fila = new Fila();
    Lista lista = new Lista();
    ListaDEC listaDec = new ListaDEC();
    ArvoreBinaria arvore = new ArvoreBinaria();
    
    public gMenu() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        jpFila = new javax.swing.JPanel();
        jpFilaLinha1 = new javax.swing.JPanel();
        btnFilaInserir = new javax.swing.JButton();
        txtFilaInserir = new javax.swing.JTextField();
        jpFilaLinha2 = new javax.swing.JPanel();
        btnFilaRemover = new javax.swing.JButton();
        btnFilaConsultar = new javax.swing.JButton();
        jpFilaLinha3 = new javax.swing.JPanel();
        btnFilaNova = new javax.swing.JButton();
        btnFilaSair = new javax.swing.JButton();
        jpListaEnc = new javax.swing.JPanel();
        jpListaEncLinha1 = new javax.swing.JPanel();
        btnListaEncInserir = new javax.swing.JButton();
        txtListaEncInserir = new javax.swing.JTextField();
        jpListaEncLinha2 = new javax.swing.JPanel();
        btnListaEncRemover = new javax.swing.JButton();
        btnListaEncConsultar = new javax.swing.JButton();
        btnListaEncNos = new javax.swing.JButton();
        btnListaEncVazia = new javax.swing.JButton();
        jpListaEncLinha3 = new javax.swing.JPanel();
        btnListaEncNova = new javax.swing.JButton();
        btnListaEncSair = new javax.swing.JButton();
        jpListaDup = new javax.swing.JPanel();
        jpListaDupLinha1 = new javax.swing.JPanel();
        btnListaDulInserir = new javax.swing.JButton();
        txtListaDulInserir = new javax.swing.JTextField();
        jpListaDupLinha2 = new javax.swing.JPanel();
        btnListaDulRemover = new javax.swing.JButton();
        btnListaDulConsultar = new javax.swing.JButton();
        btnListaDulNos = new javax.swing.JButton();
        btnListaDulVazia = new javax.swing.JButton();
        jpListaDupLinha3 = new javax.swing.JPanel();
        btnListaDulNova = new javax.swing.JButton();
        btnListaDulSair = new javax.swing.JButton();
        jpArvore = new javax.swing.JPanel();
        jpArvoreLinha1 = new javax.swing.JPanel();
        btnArvoreInserir = new javax.swing.JButton();
        txtArvoreInserir = new javax.swing.JTextField();
        jpArvoreLinha2 = new javax.swing.JPanel();
        btnArvoreBuscar = new javax.swing.JButton();
        btnArvoreConsultar = new javax.swing.JButton();
        jpArvoreLinha3 = new javax.swing.JPanel();
        btnArvoreNova = new javax.swing.JButton();
        btnArvoreSair = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Trabalho 2 - Estrutura de Dados");
        setResizable(false);

        jpFila.setLayout(new java.awt.GridLayout(3, 1));

        btnFilaInserir.setText("Inserir");
        btnFilaInserir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFilaInserirActionPerformed(evt);
            }
        });

        txtFilaInserir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtFilaInserirActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpFilaLinha1Layout = new javax.swing.GroupLayout(jpFilaLinha1);
        jpFilaLinha1.setLayout(jpFilaLinha1Layout);
        jpFilaLinha1Layout.setHorizontalGroup(
            jpFilaLinha1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpFilaLinha1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnFilaInserir)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtFilaInserir, javax.swing.GroupLayout.DEFAULT_SIZE, 401, Short.MAX_VALUE)
                .addContainerGap())
        );
        jpFilaLinha1Layout.setVerticalGroup(
            jpFilaLinha1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpFilaLinha1Layout.createSequentialGroup()
                .addContainerGap(16, Short.MAX_VALUE)
                .addGroup(jpFilaLinha1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnFilaInserir)
                    .addComponent(txtFilaInserir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jpFila.add(jpFilaLinha1);

        btnFilaRemover.setText("Remover");
        btnFilaRemover.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFilaRemoverActionPerformed(evt);
            }
        });
        jpFilaLinha2.add(btnFilaRemover);

        btnFilaConsultar.setText("Consultar");
        btnFilaConsultar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFilaConsultarActionPerformed(evt);
            }
        });
        jpFilaLinha2.add(btnFilaConsultar);

        jpFila.add(jpFilaLinha2);

        btnFilaNova.setText("Nova Fila");
        btnFilaNova.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFilaNovaActionPerformed(evt);
            }
        });

        btnFilaSair.setText("Sair");
        btnFilaSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFilaSairActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpFilaLinha3Layout = new javax.swing.GroupLayout(jpFilaLinha3);
        jpFilaLinha3.setLayout(jpFilaLinha3Layout);
        jpFilaLinha3Layout.setHorizontalGroup(
            jpFilaLinha3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpFilaLinha3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnFilaNova)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 342, Short.MAX_VALUE)
                .addComponent(btnFilaSair)
                .addContainerGap())
        );
        jpFilaLinha3Layout.setVerticalGroup(
            jpFilaLinha3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpFilaLinha3Layout.createSequentialGroup()
                .addContainerGap(16, Short.MAX_VALUE)
                .addGroup(jpFilaLinha3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnFilaNova)
                    .addComponent(btnFilaSair))
                .addContainerGap())
        );

        jpFila.add(jpFilaLinha3);

        jTabbedPane1.addTab("Fila", jpFila);

        jpListaEnc.setLayout(new java.awt.GridLayout(3, 1));

        btnListaEncInserir.setText("Inserir");
        btnListaEncInserir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListaEncInserirActionPerformed(evt);
            }
        });

        txtListaEncInserir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtListaEncInserirActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpListaEncLinha1Layout = new javax.swing.GroupLayout(jpListaEncLinha1);
        jpListaEncLinha1.setLayout(jpListaEncLinha1Layout);
        jpListaEncLinha1Layout.setHorizontalGroup(
            jpListaEncLinha1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpListaEncLinha1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnListaEncInserir)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtListaEncInserir, javax.swing.GroupLayout.DEFAULT_SIZE, 401, Short.MAX_VALUE)
                .addContainerGap())
        );
        jpListaEncLinha1Layout.setVerticalGroup(
            jpListaEncLinha1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpListaEncLinha1Layout.createSequentialGroup()
                .addContainerGap(16, Short.MAX_VALUE)
                .addGroup(jpListaEncLinha1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnListaEncInserir)
                    .addComponent(txtListaEncInserir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jpListaEnc.add(jpListaEncLinha1);

        btnListaEncRemover.setText("Remover");
        btnListaEncRemover.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListaEncRemoverActionPerformed(evt);
            }
        });
        jpListaEncLinha2.add(btnListaEncRemover);

        btnListaEncConsultar.setText("Consultar");
        btnListaEncConsultar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListaEncConsultarActionPerformed(evt);
            }
        });
        jpListaEncLinha2.add(btnListaEncConsultar);

        btnListaEncNos.setText("Total de Nós");
        btnListaEncNos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListaEncNosActionPerformed(evt);
            }
        });
        jpListaEncLinha2.add(btnListaEncNos);

        btnListaEncVazia.setText("Verifica Vazia");
        btnListaEncVazia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListaEncVaziaActionPerformed(evt);
            }
        });
        jpListaEncLinha2.add(btnListaEncVazia);

        jpListaEnc.add(jpListaEncLinha2);

        btnListaEncNova.setText("Nova Lista Encadeada");
        btnListaEncNova.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListaEncNovaActionPerformed(evt);
            }
        });

        btnListaEncSair.setText("Sair");
        btnListaEncSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListaEncSairActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpListaEncLinha3Layout = new javax.swing.GroupLayout(jpListaEncLinha3);
        jpListaEncLinha3.setLayout(jpListaEncLinha3Layout);
        jpListaEncLinha3Layout.setHorizontalGroup(
            jpListaEncLinha3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpListaEncLinha3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnListaEncNova)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 280, Short.MAX_VALUE)
                .addComponent(btnListaEncSair)
                .addContainerGap())
        );
        jpListaEncLinha3Layout.setVerticalGroup(
            jpListaEncLinha3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpListaEncLinha3Layout.createSequentialGroup()
                .addContainerGap(16, Short.MAX_VALUE)
                .addGroup(jpListaEncLinha3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnListaEncNova)
                    .addComponent(btnListaEncSair))
                .addContainerGap())
        );

        jpListaEnc.add(jpListaEncLinha3);

        jTabbedPane1.addTab("Lista Encadeada", jpListaEnc);

        jpListaDup.setLayout(new java.awt.GridLayout(3, 1));

        btnListaDulInserir.setText("Inserir");
        btnListaDulInserir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListaDulInserirActionPerformed(evt);
            }
        });

        txtListaDulInserir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtListaDulInserirActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpListaDupLinha1Layout = new javax.swing.GroupLayout(jpListaDupLinha1);
        jpListaDupLinha1.setLayout(jpListaDupLinha1Layout);
        jpListaDupLinha1Layout.setHorizontalGroup(
            jpListaDupLinha1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpListaDupLinha1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnListaDulInserir)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtListaDulInserir, javax.swing.GroupLayout.DEFAULT_SIZE, 401, Short.MAX_VALUE)
                .addContainerGap())
        );
        jpListaDupLinha1Layout.setVerticalGroup(
            jpListaDupLinha1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpListaDupLinha1Layout.createSequentialGroup()
                .addContainerGap(16, Short.MAX_VALUE)
                .addGroup(jpListaDupLinha1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnListaDulInserir)
                    .addComponent(txtListaDulInserir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jpListaDup.add(jpListaDupLinha1);

        btnListaDulRemover.setText("Remover");
        btnListaDulRemover.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListaDulRemoverActionPerformed(evt);
            }
        });
        jpListaDupLinha2.add(btnListaDulRemover);

        btnListaDulConsultar.setText("Consultar");
        btnListaDulConsultar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListaDulConsultarActionPerformed(evt);
            }
        });
        jpListaDupLinha2.add(btnListaDulConsultar);

        btnListaDulNos.setText("Total de Nós");
        btnListaDulNos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListaDulNosActionPerformed(evt);
            }
        });
        jpListaDupLinha2.add(btnListaDulNos);

        btnListaDulVazia.setText("Verifica Vazia");
        btnListaDulVazia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListaDulVaziaActionPerformed(evt);
            }
        });
        jpListaDupLinha2.add(btnListaDulVazia);

        jpListaDup.add(jpListaDupLinha2);

        btnListaDulNova.setText("Nova Lista Encadeada");
        btnListaDulNova.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListaDulNovaActionPerformed(evt);
            }
        });

        btnListaDulSair.setText("Sair");
        btnListaDulSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListaDulSairActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpListaDupLinha3Layout = new javax.swing.GroupLayout(jpListaDupLinha3);
        jpListaDupLinha3.setLayout(jpListaDupLinha3Layout);
        jpListaDupLinha3Layout.setHorizontalGroup(
            jpListaDupLinha3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpListaDupLinha3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnListaDulNova)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 280, Short.MAX_VALUE)
                .addComponent(btnListaDulSair)
                .addContainerGap())
        );
        jpListaDupLinha3Layout.setVerticalGroup(
            jpListaDupLinha3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpListaDupLinha3Layout.createSequentialGroup()
                .addContainerGap(16, Short.MAX_VALUE)
                .addGroup(jpListaDupLinha3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnListaDulNova)
                    .addComponent(btnListaDulSair))
                .addContainerGap())
        );

        jpListaDup.add(jpListaDupLinha3);

        jTabbedPane1.addTab("Lista Duplamente Enc. Circular", jpListaDup);

        jpArvore.setLayout(new java.awt.GridLayout(3, 1));

        btnArvoreInserir.setText("Inserir");
        btnArvoreInserir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnArvoreInserirActionPerformed(evt);
            }
        });

        txtArvoreInserir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtArvoreInserirActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpArvoreLinha1Layout = new javax.swing.GroupLayout(jpArvoreLinha1);
        jpArvoreLinha1.setLayout(jpArvoreLinha1Layout);
        jpArvoreLinha1Layout.setHorizontalGroup(
            jpArvoreLinha1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpArvoreLinha1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnArvoreInserir)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtArvoreInserir, javax.swing.GroupLayout.DEFAULT_SIZE, 401, Short.MAX_VALUE)
                .addContainerGap())
        );
        jpArvoreLinha1Layout.setVerticalGroup(
            jpArvoreLinha1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpArvoreLinha1Layout.createSequentialGroup()
                .addContainerGap(16, Short.MAX_VALUE)
                .addGroup(jpArvoreLinha1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnArvoreInserir)
                    .addComponent(txtArvoreInserir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jpArvore.add(jpArvoreLinha1);

        btnArvoreBuscar.setText("Buscar");
        btnArvoreBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnArvoreBuscarActionPerformed(evt);
            }
        });
        jpArvoreLinha2.add(btnArvoreBuscar);

        btnArvoreConsultar.setText("Consultar");
        btnArvoreConsultar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnArvoreConsultarActionPerformed(evt);
            }
        });
        jpArvoreLinha2.add(btnArvoreConsultar);

        jpArvore.add(jpArvoreLinha2);

        btnArvoreNova.setText("Nova Árvore");
        btnArvoreNova.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnArvoreNovaActionPerformed(evt);
            }
        });

        btnArvoreSair.setText("Sair");
        btnArvoreSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnArvoreSairActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpArvoreLinha3Layout = new javax.swing.GroupLayout(jpArvoreLinha3);
        jpArvoreLinha3.setLayout(jpArvoreLinha3Layout);
        jpArvoreLinha3Layout.setHorizontalGroup(
            jpArvoreLinha3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpArvoreLinha3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnArvoreNova)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 326, Short.MAX_VALUE)
                .addComponent(btnArvoreSair)
                .addContainerGap())
        );
        jpArvoreLinha3Layout.setVerticalGroup(
            jpArvoreLinha3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpArvoreLinha3Layout.createSequentialGroup()
                .addContainerGap(16, Short.MAX_VALUE)
                .addGroup(jpArvoreLinha3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnArvoreNova)
                    .addComponent(btnArvoreSair))
                .addContainerGap())
        );

        jpArvore.add(jpArvoreLinha3);

        jTabbedPane1.addTab("Árvore Binária de Busca", jpArvore);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-511)/2, (screenSize.height-201)/2, 511, 201);
    }// </editor-fold>//GEN-END:initComponents

    private void btnFilaSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFilaSairActionPerformed
        this.dispose();
    }//GEN-LAST:event_btnFilaSairActionPerformed

    private void btnFilaNovaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFilaNovaActionPerformed
        fila = new Fila();
    }//GEN-LAST:event_btnFilaNovaActionPerformed

    private void btnFilaInserirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFilaInserirActionPerformed
        if(txtFilaInserir.getText().equals(""))
            JOptionPane.showMessageDialog(null, "Valor vazio!", "Erro", JOptionPane.ERROR_MESSAGE);
        else{
            fila.inserir(Integer.parseInt(txtFilaInserir.getText()));
            txtFilaInserir.setText("");
        }
    }//GEN-LAST:event_btnFilaInserirActionPerformed

    private void txtFilaInserirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtFilaInserirActionPerformed
        if (txtFilaInserir.getText().equals(""))
            JOptionPane.showMessageDialog(null, "Valor vazio!", "Erro", JOptionPane.ERROR_MESSAGE);
        else {
            fila.inserir(Integer.parseInt(txtFilaInserir.getText()));
            txtFilaInserir.setText("");
        }
    }//GEN-LAST:event_txtFilaInserirActionPerformed

    private void btnFilaRemoverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFilaRemoverActionPerformed
        fila.excluir();
    }//GEN-LAST:event_btnFilaRemoverActionPerformed

    private void btnFilaConsultarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFilaConsultarActionPerformed
        fila.consultar();
    }//GEN-LAST:event_btnFilaConsultarActionPerformed

    private void btnListaEncInserirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListaEncInserirActionPerformed
        if (txtListaEncInserir.getText().equals(""))
            JOptionPane.showMessageDialog(null, "Valor vazio!", "Erro", JOptionPane.ERROR_MESSAGE);
        else {
            lista.inserir(Integer.parseInt(txtListaEncInserir.getText()));
            txtListaEncInserir.setText("");
        }
    }//GEN-LAST:event_btnListaEncInserirActionPerformed

    private void txtListaEncInserirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtListaEncInserirActionPerformed
        if (txtListaEncInserir.getText().equals(""))
            JOptionPane.showMessageDialog(null, "Valor vazio!", "Erro", JOptionPane.ERROR_MESSAGE);
        else {
            lista.inserir(Integer.parseInt(txtListaEncInserir.getText()));
            txtListaEncInserir.setText("");
        }
    }//GEN-LAST:event_txtListaEncInserirActionPerformed

    private void btnListaEncRemoverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListaEncRemoverActionPerformed
        lista.excluirNo(Integer.parseInt(JOptionPane.showInputDialog("Elemento a ser removido")));        
    }//GEN-LAST:event_btnListaEncRemoverActionPerformed

    private void btnListaEncConsultarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListaEncConsultarActionPerformed
        lista.exibirLista();
    }//GEN-LAST:event_btnListaEncConsultarActionPerformed

    private void btnListaEncNovaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListaEncNovaActionPerformed
        lista = new Lista();
    }//GEN-LAST:event_btnListaEncNovaActionPerformed

    private void btnListaEncSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListaEncSairActionPerformed
        this.dispose();
    }//GEN-LAST:event_btnListaEncSairActionPerformed

    private void btnListaEncNosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListaEncNosActionPerformed
        JOptionPane.showMessageDialog(null, "O total de nós é: " + lista.getTotalNos());
    }//GEN-LAST:event_btnListaEncNosActionPerformed

    private void btnListaEncVaziaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListaEncVaziaActionPerformed
        if (lista.Vazia())
            JOptionPane.showMessageDialog(null, "A Lista Está Vazia!");
        else
            JOptionPane.showMessageDialog(null, "A Lista Não Está Vazia!");        
    }//GEN-LAST:event_btnListaEncVaziaActionPerformed

    private void btnListaDulInserirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListaDulInserirActionPerformed
        if (txtListaDulInserir.getText().equals(""))
            JOptionPane.showMessageDialog(null, "Valor vazio!", "Erro", JOptionPane.ERROR_MESSAGE);
        else {
            listaDec.inserir(Integer.parseInt(txtListaDulInserir.getText()));
            txtListaDulInserir.setText("");
        }
    }//GEN-LAST:event_btnListaDulInserirActionPerformed

    private void txtListaDulInserirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtListaDulInserirActionPerformed
        if (txtListaDulInserir.getText().equals(""))
            JOptionPane.showMessageDialog(null, "Valor vazio!", "Erro", JOptionPane.ERROR_MESSAGE);
        else {
            listaDec.inserir(Integer.parseInt(txtListaDulInserir.getText()));
            txtListaDulInserir.setText("");
        }
    }//GEN-LAST:event_txtListaDulInserirActionPerformed

    private void btnListaDulRemoverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListaDulRemoverActionPerformed
        listaDec.excluirNo(Integer.parseInt(JOptionPane.showInputDialog("Digite o Elemento a ser Removido")));
    }//GEN-LAST:event_btnListaDulRemoverActionPerformed

    private void btnListaDulConsultarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListaDulConsultarActionPerformed
        listaDec.exibirLista();
    }//GEN-LAST:event_btnListaDulConsultarActionPerformed

    private void btnListaDulNosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListaDulNosActionPerformed
        JOptionPane.showMessageDialog(null, "O Total de Nós É: " + listaDec.getTotalNos());
    }//GEN-LAST:event_btnListaDulNosActionPerformed

    private void btnListaDulVaziaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListaDulVaziaActionPerformed
        if (listaDec.Vazia()) {
            JOptionPane.showMessageDialog(null, "A Lista Está Vazia!");
        } else {
            JOptionPane.showMessageDialog(null, "A Lista Não Está Vazia!");
        }
    }//GEN-LAST:event_btnListaDulVaziaActionPerformed

    private void btnListaDulNovaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListaDulNovaActionPerformed
        listaDec = new ListaDEC();
    }//GEN-LAST:event_btnListaDulNovaActionPerformed

    private void btnListaDulSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListaDulSairActionPerformed
        this.dispose();
    }//GEN-LAST:event_btnListaDulSairActionPerformed

    private void btnArvoreInserirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnArvoreInserirActionPerformed
        if (txtArvoreInserir.getText().equals(""))
            JOptionPane.showMessageDialog(null, "Valor vazio!", "Erro", JOptionPane.ERROR_MESSAGE);
        else {
            arvore.inserirNo(Integer.parseInt(txtArvoreInserir.getText()));
            txtArvoreInserir.setText("");
        }
    }//GEN-LAST:event_btnArvoreInserirActionPerformed

    private void txtArvoreInserirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtArvoreInserirActionPerformed
        if (txtArvoreInserir.getText().equals(""))
            JOptionPane.showMessageDialog(null, "Valor vazio!", "Erro", JOptionPane.ERROR_MESSAGE);
        else {
            arvore.inserirNo(Integer.parseInt(txtArvoreInserir.getText()));
            txtArvoreInserir.setText("");
        }
    }//GEN-LAST:event_txtArvoreInserirActionPerformed

    private void btnArvoreBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnArvoreBuscarActionPerformed
        int valor = 0;
        JOptionPane.showInputDialog(null, "Valor:","Buscar um valor", JOptionPane.INFORMATION_MESSAGE);
        arvore.busca(valor);
    }//GEN-LAST:event_btnArvoreBuscarActionPerformed

    private void btnArvoreConsultarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnArvoreConsultarActionPerformed
        gArvoreConsulta consulta = new gArvoreConsulta();
        consulta.arvore = this.arvore;
        consulta.setVisible(true);
    }//GEN-LAST:event_btnArvoreConsultarActionPerformed

    private void btnArvoreNovaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnArvoreNovaActionPerformed
        arvore = new ArvoreBinaria();
    }//GEN-LAST:event_btnArvoreNovaActionPerformed

    private void btnArvoreSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnArvoreSairActionPerformed
        this.dispose();
    }//GEN-LAST:event_btnArvoreSairActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(gMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(gMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(gMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(gMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new gMenu().setVisible(true);
            }
        });    
    
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnArvoreBuscar;
    private javax.swing.JButton btnArvoreConsultar;
    private javax.swing.JButton btnArvoreInserir;
    private javax.swing.JButton btnArvoreNova;
    private javax.swing.JButton btnArvoreSair;
    private javax.swing.JButton btnFilaConsultar;
    private javax.swing.JButton btnFilaInserir;
    private javax.swing.JButton btnFilaNova;
    private javax.swing.JButton btnFilaRemover;
    private javax.swing.JButton btnFilaSair;
    private javax.swing.JButton btnListaDulConsultar;
    private javax.swing.JButton btnListaDulInserir;
    private javax.swing.JButton btnListaDulNos;
    private javax.swing.JButton btnListaDulNova;
    private javax.swing.JButton btnListaDulRemover;
    private javax.swing.JButton btnListaDulSair;
    private javax.swing.JButton btnListaDulVazia;
    private javax.swing.JButton btnListaEncConsultar;
    private javax.swing.JButton btnListaEncInserir;
    private javax.swing.JButton btnListaEncNos;
    private javax.swing.JButton btnListaEncNova;
    private javax.swing.JButton btnListaEncRemover;
    private javax.swing.JButton btnListaEncSair;
    private javax.swing.JButton btnListaEncVazia;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JPanel jpArvore;
    private javax.swing.JPanel jpArvoreLinha1;
    private javax.swing.JPanel jpArvoreLinha2;
    private javax.swing.JPanel jpArvoreLinha3;
    private javax.swing.JPanel jpFila;
    private javax.swing.JPanel jpFilaLinha1;
    private javax.swing.JPanel jpFilaLinha2;
    private javax.swing.JPanel jpFilaLinha3;
    private javax.swing.JPanel jpListaDup;
    private javax.swing.JPanel jpListaDupLinha1;
    private javax.swing.JPanel jpListaDupLinha2;
    private javax.swing.JPanel jpListaDupLinha3;
    private javax.swing.JPanel jpListaEnc;
    private javax.swing.JPanel jpListaEncLinha1;
    private javax.swing.JPanel jpListaEncLinha2;
    private javax.swing.JPanel jpListaEncLinha3;
    private javax.swing.JTextField txtArvoreInserir;
    private javax.swing.JTextField txtFilaInserir;
    private javax.swing.JTextField txtListaDulInserir;
    private javax.swing.JTextField txtListaEncInserir;
    // End of variables declaration//GEN-END:variables
}
